<template>
    <el-collapse-item v-if="enable" :name="name">
    <template #title>
        <span style="padding-left:20px">
          按钮配置<el-icon class="header-icon"><info-filled /></el-icon>
        </span>
     </template>
    <ButtonsTable
    :element="element"
    :bpmnModeler="bpmnModeler"
   />   
  </el-collapse-item>
</template>
<script>
import ButtonsTable from './parts/ButtonsTable.vue'
import { is } from 'jeeplus-bpmn/lib/util/ModelUtil'
export default {
  components: {
    ButtonsTable
  },
  props: {
    element: {
      type: Object,
      default: undefined
    },
    bpmnModeler: {
      type: Object,
      default: undefined
    },
    name: ''
  },
  computed: {
    enable () {
      if (this.element && is(this.element, 'bpmn:UserTask')) {
        return true
      } else {
        return false
      }
    }
  }
}
</script>